package com.project.fortuneteller.utils;

import lombok.Data;

import java.util.concurrent.Future;

/**
 * 缓存实体类
 */
@Data
public class Entity {
    //键值对的value
    public Object value;

    //定时器Future
    public Future future;

    public Entity(Object value, Future future) {
        this.value = value;
        this.future = future;
    }

    /**
     * 获取值
     *
     * @return
     */
    public Object getValue() {
        return value;
    }

    /**
     * 获取Future对象
     *
     * @return
     */
    public Future getFuture() {
        return future;
    }
}
